s = "ljewgnojnvcuiwqfwegregaerghaehgttogehsdgerhwexesnoisncuebfoanwfdkewhfanfoheg**g"
sen = "g"
har = "*"
print(s.replace(sen,har))
print(s.strip(sen))